<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>创建聊天群</title>
    <link rel="stylesheet" href="{{asset('src/layui/css/layui.css')}}">
    <link rel="stylesheet" href="{{asset('src/css/common.css')}}">
</head>
<body>


<div class="head_box">
    <a class="back_a" href="{{route('user.list',['user_id'=>$user_id])}}">
        <i class="layui-icon layui-icon-return"></i>
    </a>
</div>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>创建群组</legend>
</fieldset>

<form class="layui-form layui-form-pane" action="{{route('user.addchatGroup')}}" method="post">
    @csrf
    <input type="hidden" name="user_id" value="{{$user_id}}">
    <div class="layui-form-item">
        <label class="layui-form-label">群名称</label>
        <div class="layui-input-inline">
            <input type="text" name="name" lay-verify="required" placeholder="请输入群名称" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>
</body>
</html>

<script src="{{asset('src/js/jquery.js')}}"></script>
<script src="{{asset('src/layui/layui.js')}}"></script>

<script>
    layui.use(['form', 'util', 'laydate'], function(){
        var form = layui.form;
        var layer = layui.layer;
        var util = layui.util;
        var laydate = layui.laydate;

        //提交事件
        form.on('submit(demo1)', function(data){
            // alert(JSON.stringify(data.field), {
            //     title: '最终的提交信息'
            // })
            // return false;
        });
    });
</script>

{{--公共报错提示--}}
<script type="text/javascript">
    layui.use(['layer'], function () {
        // 操作对象
        var layer = layui.layer;
        @include('web.layout.msg')//admin-公共成功提示组件
        @include('web.layout.error')//admin-公共错误提示组件

    });
</script>
